<html>
  <head>
  <title>Test window opening</title>
  <script>
  var myWindow = null
  function createWindow1()
  {
    myWindow = window.open('subwindow_closed_outside.html')
    setTimeout(function() { myWindow.close() }, 5000);
  }

  function createWindow2()
  {
    window.open("subwindow_closed_inside.html")
  }
  </script>
  </head>
  <body>
    <div id="div" style="width:400px;height:150px">
      <a href="javascript:void(0)" onclick="createWindow1()"><h1>Create a window that is closed from here</h1></a>
    </div>

    <div id="div" style="width:400px;height:150px">
      <a href="javascript:void(0)" onclick="createWindow2()"><h1>Create a window that is closed from there and you're redirected main test page</h1></a>
    </div>

    <div id="div" style="width:400px;height:150px">
      <a href="javascript:void(0)" onclick="window.close()"><h1>Try to close this window, root window cannot close itself</h1></a>
    </div>

    <div id="div" style="width:400px;height:150px">
      <a href="testfilepicker.html" target="_blank"><h1>Open file picker page into a new tab</h1></a>
    </div>
  </body>
</html>
